# -*- coding: utf-8 -*-
###################################
# create: 2024-08-27
# author: gql
# desc:   main程序入口
###################################
import sys

reload(sys)
sys.setdefaultencoding('utf8')


def main(argv):
    if len(argv) > 1:
        app = argv.pop(1)
    else:
        raise Exception("请传入应用名称 <hdfs_get|hdfs_put>")

    if app == 'hdfs_get':
        from apps.hdfs_get import get
        get.main(argv)
    elif app == 'hdfs_put':
        from apps.hdfs_put import put
        put.main(argv)
    else:
        raise Exception("Please check app name!")


if __name__ == '__main__':
    main(sys.argv)
